package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.entity.NursingProject;
import com.zzyl.pagequery.NursingProjectPageQueryParam;
import com.zzyl.vo.NursingProjectVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface NursingProjectMapper {
    /**
     * 分页查询护理项目
     * @param nursingProjectPageQueryParam
     * @return
     */
    Page<NursingProject> nursingProjectPageInfo(NursingProjectPageQueryParam nursingProjectPageQueryParam);

    /**
     * 添加护理项目
     * @param nursingProject
     */
    @Insert("insert into zzyl.nursing_project(name, order_no, unit, price, image, nursing_requirement, create_by, update_by, remark) " +
            "VALUES(#{name},#{orderNo},#{unit},#{price},#{image},#{nursingRequirement},#{createBy},#{updateBy},#{remark}) ")
    void insertNursingProject(NursingProject nursingProject);

    /**
     * 根据id查询护理项目
     * @param id
     * @return
     */
    @Select("select * from zzyl.nursing_project where id = #{id}")
    NursingProjectVo selectNursingProjectById(Long id);

    /**
     * 修改护理项目
     * @param nursingProject
     */
    void updateNursingProject(NursingProject nursingProject);

/*    *//**
     * 删除护理项目
     * @param id
     *//*
    @Delete("delete from zzyl.nursing_project where id = #{id}")
    void deleteById(Long id);

    *//**
     * 查询所有护理项目
     * @return
     *//*
    @Select("select * from zzyl.nursing_project")
    List<NursingProjectVo> selectAll();*/


}
